package com.example.person_web.core.service.impl;

import com.example.person_web.common.WrapperResponse;
import com.example.person_web.core.dao.SearchEngineDAO;
import com.example.person_web.core.dto.SearchEngineDTO;
import com.example.person_web.core.entity.SearchEngineDO;
import com.example.person_web.core.entity.UserContext;
import com.example.person_web.core.service.SearchEngineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SearchEngineServiceImpl implements SearchEngineService {
    @Autowired
    private SearchEngineDAO searchEngineDAO;
    @Override
    public WrapperResponse querySearchEngine(SearchEngineDTO searchEngineDTO) {
        searchEngineDTO.setAccount(UserContext.getUser().getAccount());
        List<SearchEngineDO> list = searchEngineDAO.querySearchEngine(searchEngineDTO);
        return WrapperResponse.success(list);
    }

    @Override
    public WrapperResponse saveSearchEngine(SearchEngineDTO searchEngineDTO) {
        return null;
    }

    @Override
    public WrapperResponse deleteSearchEngine(SearchEngineDTO searchEngineDTO) {
        return null;
    }
}
